<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
    <title><!--地服通知公告--></title>
    <meta charset="utf-8">
    <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
     <link rel="stylesheet" href="css/ui-base.css">
    <link rel="stylesheet" href="css/ui-box.css">
	<link rel="stylesheet" href="css/project/style.css">
	<link rel="stylesheet" href="css/zv_common.css">
    <script src="js/zy_control.js"></script>
	<script src="js/zy_click.js"></script>
	<script src="js/zy_json.js"></script>
	<script src="js/main.js"></script>
	<script src="js/init.js"></script>
	<script src="js/talkingdata.js"></script>
	<style>
	.zv_noticebo{  border-bottom:1px solid #e5e5e5;}
	.zv_noticefont1{height:2.2em;line-height:2.2em;color:#4C4C4C; font-size:0.925em; overflow:hidden;white-space:nowrap; text-overflow:ellipsis;}
	.zv_noticefont3{height:2.2em;line-height:2.2em;color:#a3a3a3;font-size:0.925em; width:6em;}
	</style>
</head>
<body class="ub um-vp c-wh2 ub-ver" ontouchstart id="body">
	<div id="time_0" style="width:6em"></div>
<div id="page_0" class="up ub ub-ver" tabindex="0" >
		<div  id="noticeList">
			
		</div>
		<div id="exit" style="display:none;">
			<div style="height:0.5em"> </div>
			<div ontouchstart="zy_touch(\'zv-btn-act\')" class="zvbtn  c-blu1  t-wh tx-c uc-a1 zvbtnpadding"  onclick="exit()" >下一页</div>
			<div style="height:0.5em"> </div>
		</div>	
		<input type="hidden" id="pageNum" value="1">
	</div>   
</body>
<script>
zy_init();
window.uexOnload = function(type){
	if (!type) {
		 Loading(0);
		uexWindow.setBounce("0");
		uexEMM.setEvent("1","{'地服通知公告':'地服通知公告列表'}");
		//checkUserRole(ZV_EMPLOYEE_NUMBER,'BTN_0_21',function(){noticeList(0,20);});
		noticeList(0,20)
	}
}	
function exit(){
	Loading(0);
	var pageNum = $$("pageNum").value;
	var nextPageNum = parseInt(pageNum)+1;
	$$("pageNum").value=nextPageNum;
	var exitval=nextPageNum*20
	noticeList(0,exitval)
}



function noticeList(startPage,pageNum){
	var user_name=localStorage['LoginInfor']
	user_name='['+user_name+']'
	var jsonuser = strToJson(user_name)
	var user_id=jsonuser[0].username
				$.getJSON(host_address_url+"FlowCode?RequestKey=FDDBCAA11500948183F0299431B2B571&act=GetInstanceListByKeyCode&flowCode=SecondNotice&orgCode=A_380583&userUid="+user_id+"&keyCode=123456789&whereData=&pageIndex=0&pageSize=2&recordCount=20&URL="+service_file_url,function(json){
			var w = document.body.offsetWidth;
			var zv_noticefont3w = document.getElementById("time_0").offsetWidth;
			var titleW = w-zv_noticefont3w;		
			var json = JSON.stringify(json);
			json= "["+json+"]"	 
			jsonStr = strToJson(json);
		    var objdata = jsonStr[0].instances;
			var strx = "";	
			var enl=objdata.length
			if(enl==undefined || enl=="undefined")
			{
				var b_height=$$("body").offsetHeight
				document.getElementById("noticeList").innerHTML='<div  style="width:100%; text-align:center;line-height:'+b_height+'px;"><img src="images/nodata.png" style="width:40%; text-align:center;"></div>'
				Loading(-1);
			}
			else
			{
				var jsonall = JSON.stringify(objdata);
				localStorage.setItem("zvData",jsonall);
				for(var i=0;i<objdata.length;i++)	
				 {
				 		var createTime = objdata[i].createTime;
						var a = createTime.split(" ");
						createTime = a[0];
						strx += '<div class="ub uinn umh2 zv_noticebo" ontouchstart="zy_touch(\'zvbtn-act\')" onclick=openUrl("'+objdata[i].flowId+'")>'
						strx += '<div class="ub-f2  ub ub-ver">'
	    				strx += '<div class=" zv_noticefont1"  style="width:'+titleW+'px">'+objdata[i].title+'</div>'
	        			strx += '</div>'
	   					strx += '<div class="ub-f1  tx-r  ulev-1 zv_noticefont3">'+createTime+'</div>'
	    				strx += '</div>'
				 }
				  Loading(-1);
				 $$("noticeList").innerHTML=strx;
			}
			var pageNum = $$("pageNum").value
			var exitval=pageNum*20
			if(objdata.length!=exitval)
			{		
				$$("exit").style.display = "none";   
			}
			else
			{		
				$$("exit").style.display = "block";   
			}
		})
}
function openUrl(Id)
{
	localStorage.setItem("Id",Id);	
	uexEMM.setEvent("1","{'地服通知公告':'地服通知公告详情'}");
	localStorage.setItem("cat_name","地服通知公告");	
	openNewWin('service_file_detail','service_file_detail.html');

}
</script>
</html>
